<#include "../common/head.ftl" />
<!DOCTYPE html>
<html>
<@comme_head />
<head lang="en">
    <meta charset="UTF-8">
    <title>角色权限关系列表</title>
    <link rel="stylesheet" href="/css/permission-style.css"/>
    <script src="/js/permission-model.js"></script>
    <script src="/js/roles/roleLimit.js"></script>
</head>
<body>
 <@comme_header />
    <div class="main clearfix" id="main">
    	<@comme_daohang />
        <div class="right-content">
            <div class="content">
                <h2>权限模块</h2>
                <ul> 
                    <#list rs1 as rq1>
	                    <div>
	                        <li class="first">
	                            <div><label><input class="first-1" type="checkbox" name="firstname" <#if rst?? && ((rst?size)>0)> <#list rst as parents>  <#if "${parents.power_id!}"=="${rq1.id!}">checked="checked"</#if></#list></#if> value = "${rq1.id!}"/><span>${rq1.name!}</span></label></div>
								<#list rs2 as rq2>
		                            <ul>
		                            	<#if "${rq1.id}"=="${rq2.parent_id}">
		                                	<li class="second"><label><input class="second-1" type="checkbox" <#if rst?? && ((rst?size)>0)> <#list rst as parents>  <#if "${parents.power_id!}"=="${rq2.id!}">checked="checked"</#if></#list></#if> name="secondname" value="${rq2.id!}"/>${rq2.name!}</label></li>
		                                	<#list rs3 as rq3>
	                                			<#if "${rq2.id}"=="${rq3.parent_id}">	
					                                <ul class="clearfix" style="width:100%;">
					                                   <li class="third"><label><input class="third-1"  type="checkbox"  <#if rst?? && ((rst?size)>0)> <#list rst as parents>  <#if "${parents.power_id!}"=="${rq3.id!}">checked="checked"</#if></#list></#if> name="thirdname" value="${rq3.id!}"/>${rq3.name!}</label></li>
					                                </ul>
				                                </#if>
			                                </#list>
		                                </#if>
		                            </ul>
	                            </#list>
	                        </li>
	                    </div>
                    </#list>
                </ul>
                <div class="b-c">
                    <input type="button" value="保存" onclick="save(${id})"/>
                </div>
            </div>
        </div>
    </div>
</body>
</html>